﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace Unis.ORM.Common
{
    public sealed class ValueValidated
    {
        // Fields
        private static ValueValidated _Instance;
        private static object _Obj = new object();

        // Methods
        protected ValueValidated()
        {
        }

        public bool RowIsNull(DataRow drData)
        {
            foreach (object obj2 in drData.ItemArray)
            {
                if ((obj2 != DBNull.Value) && (obj2 != null))
                {
                    return false;
                }
            }
            return true;
        }

        // Properties
        public static ValueValidated Instance
        {
            get
            {
                if (_Instance == null)
                {
                    lock (_Obj)
                    {
                        if (_Instance == null)
                        {
                            _Instance = new ValueValidated();
                        }
                    }
                }
                return _Instance;
            }
        }
    }
}
